IModel_DG Interface
- GetEntityCount
- GetEntityAt
- GetEntity
- GetLastEntity
- AddEntity
- Add
- AddNewEntity
- AddNewEntity1
- AddBRepShape
- AddNewBRepShape
- AddNewBRepSolid
- GetEntityArray
- GetEntities
- GetEntityPath
- RemoveAt
- RemoveEntity
- RemoveEntities
- RemoveAll
- Find
- BuildChildToParentMap
- GetBoundingBox
- Load
- LoadEx
- Save
- SaveEx
- GetName
- SetName
- GetDescription
- SetDescription
- Copy
- Clone
int GetEntityCount()
IEntity_DG GetEntityAt(int index)
IEntity_DG GetEntity(string path)
Indexes entities by their names. Allows retrieving entites on level deeper than the first.
Examples:
MyTopBox\ChildSphere\Cone
TopTorus\2
The second example is used in case when the third child has empty name string, in which case zero based indecies are used.
The search is case insencetive.
IEntity_DG GetLastEntity()
void AddEntity(IEntity_DG entity)
void Add(IEntityArray_DG entities, int insertAtOrNegative)
Inserts the entity at the specified index or adds at the end if the second parameter is negative.
IEntity_DG AddNewEntity()
IEntity_DG AddNewEntity1(string type)
type specifies type of geometry.
Valid values are listed in IEntity_DG.SetGeometryType() topic
IEntity_DG AddBRepShape(IBRepShape_DG shape)
Creates and adds new entity of BRep type with shape attached to it.
IEntity_DG AddNewBRepShape(ShapeType_DG type)
Creates and adds new entity of BRep type with an empty shape of the specified type.
IEntity_DG AddNewBRepSolid()
IEntityArray_DG GetEntityArray(bool includeDescendents)
IEntityArray_DG GetEntities(string path, bool includeDescendents)
Lists descendents of the entity identified by its path. See GetEntity(string path)
string GetEntityPath(IEntity_DG entity)
Returns file system - like path of entity names separated by backward slashes. See GetEntity(string path) for an example
void RemoveAt(int index)
bool RemoveEntity(IEntity_DG entity)
Removes entity from the array of the top-level entities of the model. Returns false if the entity was not found.
void RemoveEntities(IEntityArray_DG entities)
Removes the entities from the model. The entities can be at any level in the hierarchy.
void RemoveAll(bool includingDescendantsFromParents)
int Find(IEntity_DG entity)
Returns index of entity at the top level or -1 if not found
IMapUnkn_DG BuildChildToParentMap()
The returned map contains entities (map[IEntity_DG]) is an IEntity_DG) and is read-only in this release. map[entity] is the
parent of entity in this model or null for the top-level entities.
Box_DG GetBoundingBox()
Returns global axes - aligned minimal box containing all entities in the model.
bool Load(string filePath)
The path can have any supported extension. Returns false in case of errors.
bool LoadEx(string filePath, IDictionary_DG options)
The path can have any supported extension.
If filePath has no extension and is a valid folder path, the folder is considered as an stl tree directory.
Returns false in case of errors.
The options parameter is used only for .stl extension. In any case it can be null.
If options is not null the software checks for the following parameters inside:
Parameter Name |
Type |
Meaning |
Default |
Verbose |
Boolean |
If true, the software displays a pop-up dialog for the Binary option |
True |
NeedWarnings |
Boolean |
If true, the component will display a warning message when a data directory is about to be deleted. |
True |
SeparateObjects |
Boolean |
If true the component will analyse the mesh and separate linked sub-meshes as different entities. Set this property to false to improve performance.
This property should also be set to true when loading is performed from an STL Data Directory. In this case each STL file will be stored or loaded into/from different entity in the model |
True |
CreaseAngle in radians |
Double |
Crease angle. If actuall angle between normals of two adjacent simplices is greated than that, the shared egde will be considered a part of a wire between the adjacent faces(patches) |
PI/6 |
bool Save(string filePath)
The path can have any supported extension.
Returns false in case of errors.
bool SaveEx(string filePath, IDictionary_DG options)
The path can have any supported extension. If filePath has no extension, the model is saved as an stl directory. Returns false in case of errors.
The options parameter is used only for .stl extension. In any case it can be null.
If options is not null the software checks for two parameters inside:
Parameter Name |
Type |
Meaning |
Default |
Verbose |
Boolean |
If true, the software displays a pop-up dialog for the Binary option |
True |
Binary |
Boolean |
Binary or text type of stl to be saved into |
True |
string GetName()
void SetName(string name)
string GetDescription()
void SetDescription(string description)
void Copy(IModel_DG model)
IModel_DG Clone()
|